{% extends 'admin/base.html' %}

{% block content %}
    <section class="content-header">
        <h1>微电影管理系统</h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 日志管理</a></li>
            <li class="active">会员登录日志列表</li>
        </ol>
    </section>
    <section class="content" id="showcontent">
        <div class="row">
            <div class="col-md-12">
                <div class="box box-primary">
                    <div class="box-header">
                        <h3 class="box-title">会员登录日志列表</h3>
                        <div class="box-tools">
                            <div class="input-group input-group-sm" style="width: 150px;">
                                <input type="text" name="table_search" class="form-control pull-right"
                                       placeholder="请输入关键字...">

                                <div class="input-group-btn">
                                    <button type="submit" class="btn btn-default"><i class="fa fa-search"></i>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="box-body table-responsive no-padding">
                        {% include "admin/shared/_alertinfo.html" %}
                        <table class="table table-hover">
                            <tbody>
                            <tr>
                                <th>编号</th>
                                <th>会员</th>
                                <th>登录时间</th>
                                <th>登录IP</th>
                            </tr>
                            {% for userlog in page_data.items %}
                                <tr>
                                    <td>{{ userlog.id }}</td>
                                    <td>{{ userlog.user.name }}</td>
                                    <td>{{ userlog.add_time}}</td>
                                    <td>{{ userlog.ip}}</td>
                                    {#<td>
                                        <a class="label label-danger" href="#">删除</a>
                                    </td>#}
                                </tr>
                            {% endfor %}
                            </tbody>
                        </table>
                    </div>
                    <div class="box-footer clearfix">
                        <!--页码模块-->
                        {% import 'admin/shared/_pagination.html' as pg %}
                        {{ pg.render_pagination(page_data, 'admin.logs_user_log') }}
                    </div>
                </div>
            </div>
        </div>
    </section>
{% endblock %}

{% block js %}
    <script>
        // 激活菜单栏
        $(document).ready(function () {
            $("#g-8").addClass('active');
            $("#g-8-3").addClass('active');
        })
    </script>
{% endblock %}